1. Field of the Invention
The present invention relates generally to data transfers over an I/O bus, and more particularly, to data overruns during Packetized SCSI data transfers between a SCSI target and a SCSI initiator.
2. Description of Related Art
For a non-packetized SCSI data transfer, a data overrun was defined as a SCSI target device, sometimes called a SCSI target, asserting another request signal REQ during the SCSI bus data phase after the transfer of all the data associated with a scatter/gather list. Typically, an on-chip host adapter processor observed the overrun condition, and generated an interrupt with an overrun error code to a host adapter driver. The host adapter processor was paused until released by the host adapter driver.
In response to the interrupt, the host adapter driver asserted an attention signal on the SCSI bus in an attempt to get the SCSI target to change phase to SCSI bus phase MESSAGE OUT so that the host adapter driver could send an appropriate message, e.g., an abort message to the target. However, the target was stuck in the data phase because the host adapter logic was not configured to assert any more acknowledge signals after the end of the scatter/gather list.
Consequently, the host adapter driver enabled a bit bucket hardware circuit in the host adapter. The bit bucket hardware circuit automatically asserted an acknowledge signal on the SCSI bus for each extra active request signal received from the SCSI target. The acknowledge signals were asserted to enable the target to change the SCSI bus phase. The target could not change the SCSI bus phase when outstanding request signals had not been acknowledged by the host adapter.
No data was transferred between the SCSI target and the host adapter while the bit bucket hardware circuit was active. The bit bucket hardware circuit stopped asserting the acknowledge signal when either the SCSI bus changes phase or a SCSI bus free occurs. The bit bucket hardware circuit either was automatically disabled, or was disabled by the host adapter driver. The host adapter driver performed any necessary clean up in the host adapter, i.e., in the initiator, and then unpaused the host adapter processor.
The above process worked well for the non-packetized SCSI protocol. As is known to those of skill in the art, for the Packetized SCSI protocol, delimiters were introduced that broke the data stream into packets, sometimes called information units. The length of a command, data, or status information unit was specified by a value in a data length (DL) field of a header packet preceding the command, data, or status information unit. When the command, data, or status information unit exceeded the length specified in the DL field of the preceding header packet, this also was an overrun condition. The handling of overruns is further complicated in the Packetized SCSI protocol by the possibility of multiple data contexts in the same data stream.
In the prior art host adapter, once a data overrun was detected for the Packetized SCSI protocol and the bit bucket circuit was enabled by the host adapter driver, each request signal from the SCSI target was automatically responded to with an acknowledge signal generated by the automatic bit bucket circuit. Any bytes associated with the request signal were discarded. No information unit boundaries were recognized and no header packets were decoded.
Consequently, any data context in the data stream that was different from the data context for which the overrun occurred was not recognized, and the data for any other data context in the data stream was discarded. Consequently, the prior art host adapters that used automatic hardware circuitry to generate acknowledge signals when a data overrun occurred were not useful for the Packetized SCSI Protocol.